package com.leedsoft.common;

import com.leedsoft.controller.vo.PageVo;
import org.springframework.util.Assert;

import java.util.List;

/**
 * Created by leeds on 2017/6/19.
 */
public class Page <T> {
    private int pageNumber;
    private int pageSize;
    private int count = 0;
    private List<T> list;

    public Page(PageVo vo) {
        Assert.notNull(vo, "分页vo不可为空");
        pageNumber = vo.getPageNumber();
        pageSize = vo.getPageSize();
    }

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
